﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Model
{
    /// <summary>
    /// RESPONSABILITY: -data bucket
    /// </summary>
    public class Machine
    {
        public string MachineCode { get; set; }
        public string MachineDescription { get; set; }
        public int CostPerHour { get; set; }
        static private List<int> machinesIds { get; set; }
        IDGenerator idGenerator = IDGenerator.Instance;
        public int MachineId { get; private set; }

        private int CompanyId_Generator()
        {
            Type type = typeof(Company);
            return idGenerator.RandomIDGenerator(type);
        }

        public Machine(string machineCode, string machineDescription, int costPerHour)
        {
            this.MachineCode = machineCode;
            this.MachineDescription = machineDescription;
            this.CostPerHour = costPerHour;

            machinesIds = new List<int>();
            MachineId = CompanyId_Generator();
            machinesIds.Add(MachineId);
        }
    }
}
